This section describes approaches that could be employed, but does not necessarily describe approaches that previously have been conceived or employed. Hence, unless explicitly specified otherwise, any approaches described in this section are not prior art to the claims in this application, and any approaches described in this section are not admitted to be prior art by inclusion in this section.
Processor-based applications or programs to date have been written in accordance with hardware-specific and/or software-specific constraints of the underlying computing system intended to execute the applications or programs. Hence, attempts to optimize such applications or programs have been limited to setting the optimization to an unchangeable implementation for execution on a specific computing system. For example, a computer operating system (such as Microsoft Windows®) can be optimized during initial installation toward either one computing environment (e.g., executing a single application in the “foreground” to provide improved user experience), or a second distinct computing environment (e.g., executing multiple applications in the “background”): after the optimization of the operating system upon completion of the installation, there are no further changes permitted in optimizing the application. Additional examples of optimization includes optimizing a single application for a particular implementation (or a particular user), optimizing an application at a programming language level, optimizing a database for optimized execution by a specific computing system, or optimizing an application for network-based execution.
Each of the foregoing optimization techniques assumes that program optimization is based on selectively transforming a program operation into a semantically equivalent program operation based on one or more related costs, or “metrics”, associated with the program operation and its semantic equivalent. In particular, existing optimization techniques attempt to improve execution efficiency by improving a prescribed “metric”, or “cost”, that quantifies a computing system resource that is required for execution of a program operation. For example, a compiler can locate identified nodes in an program graph representing a sequence of program operations, and selectively replace the identified nodes with semantically equivalent program operations (also represented as nodes) if the associated metrics indicate a lower cost will result. Such metrics can represent memory utilization, I/O bandwidth utilization, required processor execution cycles (e.g., operation counts), etc. The compiler can be supplied with default optimization metrics (e.g., use the minimal amount of memory; use the minimum number of processor execution cycles, maximize loop unrolling, minimize inlining, etc.) in order to improve efficiency with respect to an associated performance metric (e.g., minimal execution time, minimal bandwidth utilization, or minimal memory allocation, etc.).
The complexity associated with conventional program optimization increases dramatically if the optimization is attempted simultaneously with respect to two or more optimization metrics (e.g., increase loop unrolling while reducing inlining). Program optimization is further complicated if optimization metrics considered to be related to each other are applied simultaneously, especially since optimization metrics may conflict with each other. Hence, program optimization is extremely difficult to apply in complex executable systems offering multithreading, parallel computing, network-based distributed computing etc.